﻿@model ComicBook.web.Models.ComicAuthorVM

<h2>Details for @Model.Comic.Title</h2>
<div class="row table-bordered">
    <div class="col-md-4">
        <h1 class="jumbotron" id="titleHover"><img class="img-responsive" src="@Model.Comic.Image" /></h1>
    </div>
    <div class="col-md-6 text-center">
        <br /><br />
        <div class="row">
            <div>
                <h2>@Model.Comic.Title</h2>
            </div>
            <div>
                <button class="btn btn-sm btn-warning pull-right" onclick="location.href='/Comic/EditComic/@Model.Comic.Id'">Edit Comic</button><br /><br />
                <button class="btn btn-sm btn-danger pull-right" onclick="location.href='/Comic/DeleteComic/@Model.Comic.Id'">Delete Comic</button>
            </div>

            <div>
                <table class="table table-hover">
                    <tr>
                        <td>
                            <h4 class="pull-left">Author</h4>
                        </td>
                    </tr>
                    <tr onclick="location.href='/Author/AuthorDetail/@Model.Author.Id'">
                        <td>
                            <img src="@Model.Author.Image" style="width:80px;height:80px" class="pull-left" />
                            <h4 class="text-left">@Model.Author.Name</h4>
                        </td>
                    </tr>
                </table>
                <table class="table table-hover">
                    <tr>
                        <th colspan="2">
                            Character List
                            <button class="btn btn-sm btn-success pull-right" onclick="location.href='/Character/AddCharacter/@Model.Comic.Id'">Add Character</button>
                        </th>
                    </tr>
                    <tr ><th>Add Character</th></tr>
                @foreach (var c in @Model.Comic.Characters)
                {
                    <tr>
                        <td></td>
                        <td class="text-left" onclick="location.href='/Character/CharacterDetail/@c.Id'">@c.Name</td>
                    </tr>
                }
            </table>
        </div>
    </div>

</div>
</div>

